package arrays_;

import java.util.Arrays;

/**
 * @author wly
 * @version V1.0.0
 * @date 2022/12/23 17:40
 */
public class ArraysMethod02 {
    public static void main(String[] args) {
        char[] arr = {'a', 'b', 'r', 'c', 'q', 'd'};
        System.out.println("排序前：" + Arrays.toString(arr));
        Arrays.sort(arr);
        System.out.println("排序后：" + Arrays.toString(arr));
        System.out.println(Arrays.binarySearch(arr, 'c'));
        char[] chars = Arrays.copyOf(arr, 1);
        System.out.println(Arrays.toString(chars));
    }
}
